package com.wc.test.dao;

import java.util.List;

import com.wc.test.bean.User;
/**
 * UserDao接口
 * @author ysh
 */
public interface UserDao {
	
	//查询总数
	int findCount() throws Exception;
	
	//新增用户
	int saveUser(User user) throws Exception;
	
	//删除用户
	int removeUser(int id) throws Exception;
	
	//修改用户
	int updateUser(User user) throws Exception;
	
	//查询单个用户
	User getUserByID(int id) throws Exception;
	
	//根据用户名模糊查询和并分页
	List<User> getUserList(String userName,String isSort,int currentPageNo, int pageSize)throws Exception;
	
	//登录方法
	User getLoginUser(String username)throws Exception;

	boolean validateUserName(String username)throws Exception;
	boolean validateUserId(int userId)throws Exception;
	boolean validateUserPwd(String password)throws Exception;
	
	
}
